home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 3 / ct-rom iiib.zip / ct-rom iiib / WINDOWS / DIVERSEN / WINE02BX / ISPELL.ELC < prev    next >
Text File  |  1993-03-28  |  12KB  |  96 lines

  1. ;;; compiled by jwz@thalidomide on Thu Jul  2 16:36:49 1992
  2. ;;; from file /u/jwz/emacs19/lisp/packages/ispell.el
  3. ;;; emacs version 19.2.1 Lucid.
  4. ;;; bytecomp version 2.07; 17-jun-92.
  5. ;;; optimization is on.
  6. ;;; this file uses opcodes which do not exist in Emacs18.
  7.  
  8. (if (and (boundp 'emacs-version)
  9.      (or (and (boundp 'epoch::version) epoch::version)
  10.          (string-lessp emacs-version "19")))
  11.     (error "This file was compiled for Emacs19."))
  12.  
  13. (defconst ispell:highlight-p t "\
  14. *When not nil, spelling errors will be highlighted.")
  15. (defvar ispell:check-comments nil "\
  16. *When true, the spelling of comments in region is checked.")
  17. (defvar ispell:program-name "ispell" "\
  18. Program invoked by ispell-word and ispell-region commands.")
  19. (defvar ispell:alternate-dictionary "/usr/dict/web2" "\
  20. Alternate dictionary for spelling help.")
  21. (defvar ispell:grep-command "/usr/bin/egrep" "\
  22. Name of the grep command for search processes.")
  23. (defvar ispell:look-command "/usr/bin/look" "\
  24. Name of the look command for search processes.")
  25. (defconst ispell:casechars "[A-z]" "\
  26. Regular expression of valid characters that comprise a word.")
  27. (defconst ispell:not-casechars "[^A-z]" "\
  28. Opposite of ispell:casechars")
  29. (defconst ispell:otherchars "[---']" "\
  30. Regular expression of other characters that are valid in word constructs.")
  31. (defvar ispell-process nil "\
  32. Holds the process object for 'ispell'")
  33. (defvar ispell:pdict-modified-p nil "\
  34. T when the personal dictionary has modifications that need to be written.")
  35. (defvar ispell:quit nil "\
  36. Set to t when user want to abort ispell session.")
  37. (defvar ispell:look-p t "\
  38. Use look. Automatically reset if look not available")
  39. (defvar ispell:filter nil "\
  40. Output filter from piped calls to ispell.")
  41. (defvar ispell:filter-continue nil "\
  42. Control variable for ispell filter function.")
  43. (fset 'ispell-word #[(&optional preceding quietly) "┴\n├─░┼ëëëë    \n è╠!¼Æ½ê╬e╧#ê¬å╨d╧#ê╬e╩#ê╠\n!½Öo¼û╥╙!ê╠!½ë╬e╧#ê¬ä╥╘!ê╨ d╧#¼ä╒╓!ê╫ö\n╫ò    \n    {)\nbê¼ç┘┌û\"ê█ ê▄▐\"ê▄▀P\"êα!ê!@Γÿ½t▄π\"ê!Aë!<½çΣ!@!╧=½ÄäC┘σû\"ꬷ;½É¼±┘µûû#ê¬σ¼å┘τ!ê¬█ΦÄ)½ëΩ\n    ╧ë$êδAA@AAA@@#,<½à,@,)½ó    bê\n    |ê:¼çφ!ê¬îφ@!êε╧\"ê∩≡!½ä±≡!ê≥ ê3¡ä┼ë3.ç" [ispell:casechars "+\\(" ispell:otherchars "?" "+\\)?" nil replace poss word end start word-regexp looking-at preceding re-search-backward t re-search-forward ispell:not-casechars backward-char 1 -1 error "No word found to check!" 0 quietly message "Checking spelling of %s..." ispell-init-process process-send-string ispell-process "%\n" "\n" accept-process-output ispell:filter "" "!\n" ispell-parse-output "Found %s" "Found %s because of root %s" "Error in ispell process" ((byte-code "½ç┴\n ─┼$ê─ç" [ispell:highlight-p highlight-spelling-error start end nil t] 5)) ispell:highlight-p highlight-spelling-error ispell-choose ispell:pdict-modified-p insert-string ispell-word get-buffer "*Choices*" kill-buffer ispell-pdict-save ispell:quit] 7 "\
  44. Check spelling of word under or following the cursor.
  45. If word not found in dictionary, display possible corrections in a window 
  46. and let user select.
  47.   Optional argument PRECEDING set for checking preceding word when not
  48. over a word, and QUIETLY suppresses messages when word is correct.
  49.   Word syntax described by ispell:casechars and ispell:otherchars." nil])
  50. (fset 'ispell-pdict-save #[nil "½è┴┬!½à├ ┼\"ê╞ëç" [ispell:pdict-modified-p y-or-n-p "Personal dictionary modified.  Save? " process-send-string ispell-process "#\n" nil] 3 "\
  51. Check to see if the personal dictionary has been modified.
  52.   If so, ask if it needs to be saved." nil])
  53. (fset 'ispell-choose #[(miss guess word) "└Ä┴ï)ç" [((bury-buffer "*Choices*")) ((byte-code "└┴\n┴├ëë    \nè╦╠!qê═ ê╬½┤╤cê½ñi@G╥\\\\╙ V½ê╘cê    T    @╒▒êAë¼\\╓cê    ╥\\    ½╞i@G╫\\\\╙ V½ê╘cê    T    ╪\n┘\\┌@█▒êA\n▄>½Æ\n▌U½å\n▐\\¬ë\n┴\\¬â\nT\n¬6)▀    !êα╠!êßΓ !êπΣ!êσ ë┘ZëµW¼╗τW½åΦZ¬░ΘW½å┴Z¬ÑΩW½å▐Z¬ÜδW½å╥Z¬Å∞W½åφZ¬ä╫ZεU½ä├éì∩U½æ≡1≥3╘Q\"ê⌠5├éì÷U½ô≡1≈3╘Q\"ê5C5├éì°U½è∙·3\"├Béì√U¼ì<U¼å²U½ç■ïê éìü@U½ç A├éìüBU½¢üCüD!àì AüE1!ê├ë5éìüFUâE∙üG3\"┴HëIâAè└\n╦╠!qê═ ê╬üJI!ë½╚i@G╫\\\\╙ V½ê╘cêHTH╪\n┘\\┌@█▒êA\nüK>½Æ\n▌U½å\n▐\\¬ë\n┴\\¬â\nT\n¬4)ßüL !êH    U¼¥H    V½îüMH    Z!ê¬èüN    HZ!êßΓ !ê* ¬╚└Y½ï\nW½à\n8¬╕üOU½êüP ê ¬¿üQU½èèüR ê) ¬ûüSU½êüT ê ¬åüU ê ë =ä░ .ç" [0 2 miss nil result num char window-min-height choices line count get-buffer-create "*Choices*" erase-buffer "--  %b  --" mode-line-format guess "    Affix rules generate and capitalize this word as shown below:\n" 4 window-width "\n" "    " "\nUse option \"i\" if this is a correct composition from the derivative root.\n\n" 7 "(" 48 ") " "  " (14 48 56 59 64 71) 64 3 overlay-window switch-to-buffer select-window next-window message "^h or ? for more options; Space to leave unchanged, Character to replace word" read-char 15 49 1 57 60 65 72 6 32 105 process-send-string ispell-process "*" word (t) ispell:pdict-modified-p 97 "@" 114 read-string "Replacement: " 63 help-char 8 ((byte-code "└┴ !êè┬├!ê─ ê┼cê╞cê╟╚!ê─ ê)└ç" [select-window minibuffer-window enlarge-window 1 erase-buffer "[r]eplace word;  [a]ccept for this session;  [i]nsert into private dictionary;\n" "[l]ook a word up in alternate dictionary;  e[x]it;  [q]uit session." sit-for 5] 2)) t 120 ispell:quit 113 y-or-n-p "Really quit ignoring changes? " process-send-eof 108 "Lookup string ('*' is wildcard): " new-line new-word lookup-words (14 48 56 59 64 71) previous-window enlarge-window shrink-window 12 redraw-display 18 recursive-edit 26 suspend-emacs ding] 8))] 1 "\
  54. Display possible corrections from list MISS.
  55.   GUESS lists possibly valid affix construction of WORD.
  56.   Returns nil to keep word.
  57.           string for new chosen word.
  58.           list for new replacement word (needs rechecking).
  59.   Global ispell:pdict-modified-p becomes a list where the only value indicates
  60.    whether the dictionary has been modified when option a or i is used.  This
  61.    must be returned to an atom by the calling program."])
  62. (fset 'lookup-words #[(word) "┴┴ âì┼╞\"¼ⁿ┴╔╩!ê╦╠!ê═╬┴╨&╥╙\"ê╘!ê╒!╓=¼sG╠U½╟╦╫!ê╘!ê┼╪@\"¼ä┴¬│╔┘!ê╦╠!ê┴┴┴═█┴▌▐▀Q&╥╙\"ê╘!ê╒!╓=¼s)¬Ω╔α!ê╦╠!ê╠┴ë!\"#┼╞##ë!½ò\"#!OΣQ\"!Të#¬î\"#┴OP\"┴¼Q▐\"▀Q+═█┴▌&╥╙\"ê╘!ê╒!╓=¼s) \n*ç" [ispell:filter nil results save-ispell-filter ispell:look-p string-match "\\*" word temp-ispell-process message "Starting \"look\" process..." sit-for 0 start-process "look" ispell:look-command "-df" ispell:alternate-dictionary set-process-filter ispell-filter accept-process-output process-status run 1 "Couldn't exec the program " "Look failed, starting \"egrep\" process..." ispell:filter-continue "egrep" ispell:grep-command "-i" "^" "$" "Starting \"egrep\" process..." end new-word start ".*"] 8 "\
  63. Look up word in dictionary contained in the
  64.   ispell:algernate-dictionary variable.  A '*' is used for wild cards.
  65.   If no wild cards, LOOK is used if it exists.
  66.   Otherwise the variable ispell:grep-command contains the command used to search
  67.   for the words (usually egrep)."])
  68. (fset 'ispell-filter #[(process output) "└┴┬ ¡═╞╟#    ½ù\n½ô\n<½Ä\në@ OPáê¬è O\nB\n ¼ê┴    ┬ë¬G┬     TëGU½à┬ë¬5 ¬0+ç" [0 t nil end continue start string-match "\n" output ispell:filter-continue ispell:filter] 6 "\
  69. Output filter function for ispell, grep, and look."])
  70. (fset 'highlight-spelling-error #[(start end &optional highlight dont-modify) "└┴\n\"½Ü└├\n\"½è─$ç╔$ç╩ {╦╠|ê╤╥Z\"ê╙╘!ê½à?|êcê╙╘!ê½à?½à╓!ê╫╪!,ç" [string-match "^19\\." emacs-version "Lucid" highlight-spelling-error-v19-Lucid start end highlight dont-modify highlight-spelling-error-v19 buffer-modified-p t nil buffer-undo-list inhibit-quit text modified insert-char 32 sit-for 0 inverse-video set-buffer-modified-p message " "] 5 "\
  71. Highlight a word by toggling inverse-video.
  72.   highlights word from START to END.
  73.   When the optional third arg HIGHLIGHT is set, the word is drawn in inverse
  74.   video, otherwise the word is drawn in normal video mode.
  75.   Optional forth arg DONT-MODIFY keeps buffer modification flag from being set
  76.   from this function."])
  77. (byte-code "└┴Mê┬├Mç" [highlight-spelling-error-v19 #[(start end &optional highlight dont-modify) "½ô    \nB─ ╞ô─ ╞ô¬ê @ A╞╚╔!ç" [highlight selection-begin selection-end ispell-saved-selection make-marker start nil end sit-for 0] 3] highlight-spelling-error-v19-Lucid #[(start end &optional highlight dont-modify) "½ç┴\n \"ê¬ä─┼!ê╞╟!ç" [highlight isearch-highlight start end isearch-dehighlight t sit-for 0] 3]] 2)
  78. (fset 'overlay-window #[(height) "èè└yê`)è┴\n!ê`)├ëW½â╟\n!╚ \",ç" [0 move-to-window-line height nil newin top oldot split-window-vertically set-window-start] 4 "\
  79. Create a (usually small) window with HEIGHT lines and avoid
  80. recentering."])
  81. (fset 'ispell-parse-output #[(output) "┴ÿ½é┬ç├─O┼ÿ½à╞╟Oç├─O╞╚╔╞#O├╟ëë\n  ├ò╟O╨ÿ½à├ ¬Å╤! ╚╔─#T╟O╤!╨ÿ½ä╟¬è╚╔─#T╟O½║╚╙\"Të V½î├O\nB\n¬è├O B ─ò½ä╟¬ê╞\\╟O)¬C \nF.ç" [output "*" t 0 1 "+" 2 nil string-match " " guess-list miss-list count cur-count original-word type "#" string-to-int offset ",\\|\\($\\)" end] 8 "\
  82. Parse the OUTPUT string of 'ispell' and return:
  83.  1) T for an exact match.
  84.  2) A string containing the root word for a match via suffix removal.
  85.  3) A list of possible correct spellings of the format:
  86.     '(\"original-word\" offset miss-list guess-list)
  87.     original-word is a string of the possibly misspelled word.
  88.     offset is an integer of the line offset of the word.
  89.     miss-list and guess-list are possibly null list of guesses and misses."])
  90. (fset 'ispell-init-process #[nil "½ì┴!┬=½å├├ëç╞╟!ê╚╔!ê╩╦├ ═╬%├├╧╨\"ê╤╥\"ê╙!ç" [ispell-process process-status run nil ispell:filter ispell:filter-continue message "Starting new ispell process..." sit-for 0 start-process "ispell" ispell:program-name "-a" "-m" set-process-filter ispell-filter process-send-string "!\n" process-kill-without-query] 6 "\
  91. Check status of 'ispell' process and start if necessary."])
  92. (fset 'ispell-region #[(reg-start reg-end) "└ ê    ┬>½ç├ ┼\"ê¬à├ ╞\"êè╟╚    eU½è\ndU½ä╦ ¬ü╠\"ê═╬!ê    bêä`\nWâ`╬è╨ê`\n^)╨l½à╒uê¬∙¼╨½╠╪┘#½├`ZGU½ò█ÿ½à╒yê¬╙╪\n▄#ê¬╔`GZbê▌┘#½ë{▀Pbê)¬Ñαß!½à╒uꬢ▌┘#½Å{▀Pbê¬â╒yê`â·╨\"├ \"êπ !ê$@█ÿ½u$Aƒ$ä∙$â∙σ$@!ë\"<â±\"A@\\\\ë&\"@G\\'╨(&bê'▌\"@'┘#ê`U¼ëΘΩ\"@&#êδÄ,½ïφ&'┘ë$ê¬ä═╬!êε\"AA@\"AAA@\"@#()&bê(½σ(<½┤╨$(@G\"@GZ/\n/\\\n/\\)&'|ê(@cê≡(@G!ê`¬┴&'|ê(cê(G\"@GZ/\n/\\\n/\\/\\)¬ò1½æ1<½î1@1╨$'╟≥!ê═╬!ê+$A$é⌡)bê,é2)≤ ê½â╨╟⌠!ç" [ispell-init-process major-mode (plain-TeX-mode plain-tex-mode TeX-mode tex-mode LaTeX-mode latex-mode) process-send-string ispell-process "+\n" "-\n" message "Spelling %s..." reg-start reg-end buffer-name "region" sit-for 0 ispell:quit nil string end offset-change start 1 ispell:check-comments comment-start search-forward t comment-end "" limit re-search-forward ispell:casechars "\n" looking-at "[---#@*+!%]" poss accept-process-output ispell:filter ispell-parse-output word-start word-end replace error "***ispell misalignment: word \"%s\" point %d; please retry." ((byte-code "½ç┴\n ─┼$ê─ç" [ispell:highlight-p highlight-spelling-error word-start word-end nil t] 5)) ispell:highlight-p highlight-spelling-error ispell-choose change backward-char ispell:pdict-modified-p "continuing spelling check..." ispell-pdict-save "Spell done."] 6 "\
  93. Interactively check a region for spelling errors." "*r"])
  94. (fset 'ispell-buffer #[nil "└ed\"ç" [ispell-region] 3 "\
  95. Check the current buffer for spelling errors interactively." nil])
  96.